//
//  LogoutRequest.m
//  TestGizWits
//
//  Created by JM on 15/11/17.
//  Copyright © 2015年 JM. All rights reserved.
//

#import "LogoutRequest.h"
#import <XPGWifiSDK/XPGWifiSDK.h>

@implementation LogoutRequest

- (void)didRealRequest {
    [[XPGWifiSDK sharedInstance] userLogout:self.DY_uid];
}

//使⽤注销事件
- (void)XPGWifiSDK:(XPGWifiSDK *)wifiSDK didUserLogout:(NSNumber *)error errorMessage:(NSString *)errorMessage
{
    if([error intValue] == XPGWifiError_NONE)
    {
        LogoutResponse *response = [LogoutResponse response];
        response.DY_wifiSDK = wifiSDK;
        self.block(response,nil);
    }
    else
    {
        NSError *newError = [NSError dy_errorWithErrCode:error.integerValue errMessage:errorMessage];
        self.block(nil,newError);
    }
    [super superHandelResponse];
}

@end

@implementation LogoutResponse

@end
